﻿Public Class Cargando

    Private Sub Cargando_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ProgressBar.Increment(1)
        If ProgressBar.Value = 1 Then
            lblcargando.Text = "Cargando Usuario"
        End If
        If ProgressBar.Value = 10 Then
            lblcargando.Text = "Cargando Panel Principal"
        End If
        If ProgressBar.Value = 20 Then
            lblcargando.Text = "Cargando Base de Datos Deporte"
        End If
        If ProgressBar.Value = 30 Then
            lblcargando.Text = "Cargando Base de Datos Evento"
        End If
        If ProgressBar.Value = 40 Then
            lblcargando.Text = "Cargando Base de Datos Reserva"
        End If
        If ProgressBar.Value = 45 Then
            lblcargando.Text = "Cargando Base de Datos Proveedor"
        End If
        If ProgressBar.Value = ProgressBar.Maximum Then
            PrincipalMDI.Show()
            Timer1.Stop()
            Me.Close()
        End If
    End Sub

End Class